You are here: Statements and Functions > Report
Syntax samples
REPORT {WITH RESET} {AS <string expression>}
REPORT
REPORT WITH RESET
IF thruput = 50 THEN REPORT AS "RepOvr50"
Calculates and reports the current statistics to the output database. This is useful to get a snapshot of the model while it is running.
The REPORT statement may be followed by the WITH RESET option to reset the statistics after the report is made to the database When you use the WITH RESET option, you generally want to provide some looping or event creation that will call the report function at the appropriate time.
Used with the AS option, REPORT creates a report with the name specified in the expression that can be accessed in the Output Program when creating a General Stats report.
Any logic.
Components
<string expression>
A unique name given to the report so it can be easily identified in the General Stats dialog in the Output Program. If any reports have the same name, a number is tacked on the end of the name to make it unique.
Example
To get a snapshot report every 40 hours, enter the following:
WHILE Clock(hr) < 10000 DO
BEGIN
WAIT 40 hr
REPORT AS "40HOUR"
END
This results in reports named, 40HOUR, 40HOUR2, 40HOUR3....
Please note
If you use the REPORT statement even once, a final overall report will NOT be created since the report generated with your use of the statement may be the final report desired. In this case, you must use the REPORT statement at the end of termination logic in order to create a final report if desired. If a REPORT statement is never used, a final overall report is created automatically.
RESET STATS and WARMUP.